<template>
	<view class="uni-list">
		<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item, index) in list" :key="index">
			<view class="uni-media-list" @tap="jump()">
				<view class="title">
					<image class="logo" :src="item.img"></image>
					<text>{{ item.title }}</text>
				</view>
				<view class="texts">
					<text>{{ item.label }}</text>
					<text>{{ item.comment }}</text>
					<text>{{ item.date }}</text>
				</view>
			</view>
			<view class="uni-img"><image :src="item.image" mode=""></image></view>
		</view>
	</view>
</template>
<script>
export default {
	data() {
		return {
			list: ''
			// list:[{
			// 		img: require('../../static/img/news/zhiding.png'),
			// 		title: '美媒披露美国核武库最共有3800枚核弹头',
			// 		image: require('../../static/img/news/tupiana.png'),
			// 		comment: '56条评论',
			// 		label: '电视台',
			// 		date: '1小时前'
			// 	},
			// 	{
			// 		img: require('../../static/img/news/zhiding.png'),
			// 		title: '美媒披露美国核武库最共有3800枚核弹头',
			// 		image: require('../../static/img/news/tupiana.png'),
			// 		comment: '56条评论',
			// 		label: '电视台',
			// 		date: '1小时'
			// 	},
			// 	{
			// 		img: require('../../static/img/news/zhiding.png'),
			// 		title: '美媒披露美国核武库最共有3800枚核弹头',
			// 		image: require('../../static/img/news/tupiana.png'),
			// 		comment: '56条评论',
			// 		label: '电视台',
			// 		date: '1小时'
				//}]
		}     
	},
	onLoad() {
		console.log("aaaa");
		uni.request({
		    url: 'http://yijiazhihui.40b876.cn/news', //仅为示例，并非真实接口地址。
			method:"post",
			header:{'content-type':'application/x-www-form-urlencoded'},
		    data: {
		        type: 'imgtext',  
				page: 1,
				page_size:10
		    },
		    success: (res) => {
		        console.log(JSON.stringify(res));
		    }
		})
	},
	methods:{  
		// jump(){
		// 	uni.navigateTo({
		// 		url: 'particulars'
		// 	});
		// }
	}
};
</script>

<style lang="scss">
.uni-list {
	margin: 30upx 30upx 30upx 30upx;
	background-color: #ffffff;
	height: auto;
	
	.uni-list-cell {
		padding: 15upx 15upx 15upx 15upx;;
		width: 690upx;
		height: 160upx;
		border-bottom: 1px solid #f5f6f7;
		.uni-media-list {
			float:left;
			width:430upx;
			.title {
				
				height: 78upx;
				font-size:32upx;
				color:#282828;
				margin-bottom:45upx;
				.logo {
					width: 73upx;
					height: 32upx;
					padding-right: 10upx;
				}
			}
			.texts{
				color: #989898;
				font-size:24upx;
				text{
					padding-right: 60upx;
				}
			}
		}
		.uni-img {
			float: left;
			image {
				width: 233upx;
				height: 150upx;
			}
		}
	}
}
</style>
